package com.woniuxy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.mapper.DepartmentMapper;
import com.woniuxy.pojo.Department;
import com.woniuxy.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author admin
* @description 针对表【department(科室表（合并一级和二级科室）)】的数据库操作Service实现
* @createDate 2025-05-29 19:14:16
*/
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department>
    implements DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;
    @Override
    public List<Department> getDartment() {
        QueryWrapper<Department> wrapper = new QueryWrapper<>();
        wrapper.eq("level",1);
        List<Department> departments = baseMapper.selectList(wrapper);
        return departments;
    }


}




